<template>
	<view class="newNotice">
		<view class="mail_List">
			<view class="mail" style="font-weight: 700;">
				<view class="order">党建资讯</view>
			</view>
		</view>
		<view class="icon">
			<u-icon name="arrow-left" color="#fefefe" size="40" @click="navigateBack"></u-icon>
		</view>
		<view class="card">
			<uni-card class="second_card" style="margin: 0;">
				<u-form :model="form" ref="uForm">
					<u-form-item label="标题:">
						<u-input v-model="form.type" placeholder-style="color: #cccccc; text-align: right;"
							placeholder="请输入标题" />
					</u-form-item>
					<u-form-item label="输入转载连接:">
						<u-input v-model="form.address" placeholder-style="color: #cccccc; text-align: right;"
							placeholder="请输入党建资讯转载网址" />
					</u-form-item>
					<u-form-item label="内容:" label-position="top">
						<u-input v-model="form.describe" type="textarea"
							placeholder-style="color: #cccccc; text-align: left;" placeholder="请输入通知公告" />
					</u-form-item>
				</u-form>
			</uni-card>
		</view>
		<view class="button">
			<u-button type="primary" style="flex: 1;">取消</u-button>
			<u-button type="success" style="flex: 1;" @click="determine">确定</u-button>
		</view>
		<!-- 弹框 -->
		<u-toast ref="uToast" />
	</view>
</template>

<script>
	export default {
		data() {
			return {
				// form表单
				form: {
					type: '',
					title: '',
					address: '',
					describe: '',
					chargePerson: '',
					Executor: '',
					Maintenance: '',
					end: ''
				},
				
			}
		},
		onLoad() {
			// 展示全部数据
			// this.getRecords()
		},
		methods: {
			// 展示全部数据
			determine() {
				this.$http.post('informationInquiry/insertAdvisory',{
					title:this.form.type,
					content:this.form.describe,
					skipUrl:this.form.address
				}).then(res => {
					this.$refs.uToast.show({
						title: res.msg,
					})
					// console.log(res, '课程分类')
					setTimeout(function() {
						uni.navigateBack()
					}, 1000);
					// this.application = res.data
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.newNotice {

		.mail_List {
			overflow: hidden;
			width: 100%;
			background-color: #f2f2f2;

			.mail {
				padding: 10rpx 0;
				// margin-top: 96rpx;
				color: #999999;
				font-size: 40rpx;
				background-color: #e5e5e5;
			}

			.order {
				text-align: center;
			}
		}

		/deep/.card {
			.u-input__input {
				// text-align: right;
				min-height: 60rpx !important;
			}

			u-form-item {
				input {
					text-align: right;
				}

				.u-form-item__message {
					padding-left: unset !important;
				}
			}

			.data-v-c6c7e61e:nth-child(4) {
				.u-input__input {
					text-align: left;
					min-height: 38rpx !important;
				}
			}

			.u-form-item--left {
				flex: unset !important;
				width: unset !important;
			}
		}

		.icon {
			position: absolute;
			top: 18rpx;
			// top: 114rpx;
			left: 20rpx;
		}

		/deep/.second_card {
			/deep/.u-cell__value {
				margin-right: -18rpx;
			}

			.u-cell {
				padding: 18rpx 32rpx;
			}

			.uni-card__content {
				padding: 0 24rpx !important;
			}
		}

		/deep/.uni-border {
			border-radius: unset !important;
			margin: 24rpx 0 !important;
		}

		.uni-border[data-v-19622063]:after {
			border: unset;
		}

		/deep/.uni-border.data-v-19622063:after {
			border: unset;
		}

		.slot-btn {
			display: flex;
			flex-direction: column;
			width: 200rpx;
			height: 280rpx;
			display: flex;
			justify-content: center;
			align-items: center;
			background-color: #e5e5e5;

			.add_Photo {
				margin-top: 10rpx;
				color: #cccccc;
			}
		}

		.slot-btn__hover {
			background-color: rgb(235, 236, 238);
		}

		/deep/.button {
			display: flex;
			position: fixed;
			left: 0;
			right: 0;
			bottom: 0;
			// margin-top: 200rpx;
			border-radius: 14rpx;
			overflow: hidden;
			z-index: 9;

			.u-btn {
				border-radius: unset;
			}
		}
	}
</style>
